var fs = require('fs'),
    xml2js = require('xml2js'),
    util = require('util');

var parser = new xml2js.Parser({attrkey: '@'});
fs.readFile(__dirname + '/../file/Hentai2W.sited.xml', function(err, data) {
    parser.parseString(data, function (err, result) {
        //console.log(util.inspect(result, false, null));
        console.log(JSON.stringify(result));
        var builder = new xml2js.Builder({cdata: true, attrkey: '@'});
        var xml = builder.buildObject(JSON.stringify(result));

        console.log();
        console.log();
        console.log(xml);
    });
});